import components from '@/components';
import { RouteRecordRaw } from 'vue-router';

export const constantRoute: RouteRecordRaw[] = [
  {
    path: '/board',
    component: () => import('@/components/calendar/board.vue'),
    name: 'board',
    meta: {
      title: '看板',

    }
  },
  {
    path: '/calendar',
    component: () => import('@/components/calendar/index.vue'),
    name: 'calendar',
    meta: {
      title: '日历',

    }
  },
  {
    path: '/canvas',
    component: () => import('@/views/canvas/index.vue'),
    name: 'Canvas',
    meta: {
      title: '画布',

    }
  },{
        // 登录
        path: '/login',
        component: () => import('@/views/login/index.vue'),
        name: 'login', // 命名路由
        meta: {
            title: '登录', // 菜单标题
            hidden: true, // 代表路由标题在菜单中是否隐藏 true:隐藏 | false: 不隐藏
            icon: 'Promotion' // 菜单文字左侧图标,支持element-plus所有图标
        }
    },
    {
        path: '/',
        component: () => import('@/layout/index.vue'),
        name: 'layout',
        meta: {
            title: '',
            hidden: false,
            icon: ''
        },
        redirect: '/home',
        children: [
            {
                path: '/home',
                component: () => import('@/views/home/index.vue'),
                meta: {
                    title: '首页',
                    hidden: false,
                    icon: 'HomeFilled'
                }
            }
        ]
    },
    {
        //404
        path: '/404',
        component: () => import('@/views/404/index.vue'),
        name: '404',
        meta: {
          title: '404',
          hidden: true,
          icon: 'DocumentDelete',
        },
      },
]
// 权限管理
export const asnycRoute = [
    {
        path: '/acl',
        component: () => import('@/layout/index.vue'),
        name: 'Acl',
        meta: {
          title: '画布',
          icon: 'Lock',
        },
        redirect: '/acl/canvas',
        children: [
          {
            path: '/acl/canvas',
            component: () => import('@/views/canvas/index.vue'),
            name: 'Canvas',
            meta: {
              title: '画布',
              icon: 'User',
            },
          },
          
        ],
      },
]
export default constantRoute;